﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CommLib.LeCloud.Models
{
    public class LiveCreateModels : LiveBaseModels
    {

        /// <summary>
        /// 活动分类
        /// </summary>
        public ActivityCategory activityCategory { get; set; } = ActivityCategory.其他;
    }

    public class LiveEditModels : LiveBaseModels
    {
        /// <summary>
        /// 直播活动ID
        /// </summary>
        public string activityId { get; set; }
    }

    public class LiveBaseModels
    {
        /// <summary>
        /// 直播活动名称(200个字符以内)
        /// </summary>
        public string activityName { get; set; }

        /// <summary>
        /// 开始时间 格式yyyyMMddHHmmss
        /// </summary>
        public string startTime { get; set; } = DateTime.Now.ToString("yyyyMMddHHmmss");

        /// <summary>
        /// 结束时间 格式yyyyMMddHHmmss
        /// </summary>
        public string endTime { get; set; } = DateTime.Now.AddYears(1).ToString("yyyyMMddHHmmss");
        /// <summary>
        /// 活动封面地址，如果为空，则系统会默认一张图片
        /// </summary>
        public string coverImgUrl { get; set; }
        /// <summary>
        /// 活动描述（1024个字符以内）
        /// </summary>
        public string description { get; set; }

        /// <summary>
        /// 机位数量，范围为：1,2,3,4. 默认为1
        /// </summary>
        public LiveNum liveNum { get; set; } = LiveNum.One;
        /// <summary>
        /// 流的码率类型，逗号分隔。由大到小排列。取值范围：10 流畅；13 标清；16 高清；19 超清；22 720P；25 1080P；99 原画
        /// </summary>
        public CodeRateTypes[] codeRateTypes { get; set; }

        /// <summary>
        /// 是否支持全程录制 0：否 1：是。默认为0
        /// </summary>
        public NeedRecord needRecord { get; set; } = NeedRecord.No;

        /// <summary>
        /// 是否支持时移 0：否 1：是。默认为0
        /// </summary>
        public NeedTimeShift needTimeShift { get; set; } = NeedTimeShift.No;

        /// <summary>
        /// 是否全景观看 0：否 1：是。默认为0
        /// </summary>
        public NeedFullView needFullView { get; set; } = NeedFullView.No;

        /// <summary>
        /// 播放模式，0：实时直播。1：延时直播
        /// </summary>
        public PlayMode playMode { get; set; } = PlayMode.RealTime;
    }

    /// <summary>
    /// 机位数量
    /// </summary>
    public enum LiveNum
    {
        /// <summary>
        /// 1个机位
        /// </summary>
        One = 1,
        /// <summary>
        /// 2个机位
        /// </summary>
        Two = 2,
        /// <summary>
        /// 3个机位
        /// </summary>
        Three = 3,
        /// <summary>
        /// 4个机位
        /// </summary>
        Four = 4
    }
    /// <summary>
    /// 是否支持全程录制 
    /// </summary>
    public enum NeedRecord
    {
        /// <summary>
        /// 否
        /// </summary>
        No=0,
        /// <summary>
        /// 是
        /// </summary>
        Yes=1
    }
    /// <summary>
    /// 是否支持时移  
    /// </summary>
    public enum NeedTimeShift
    {
        /// <summary>
        /// 否
        /// </summary>
        No = 0,
        /// <summary>
        /// 是
        /// </summary>
        Yes = 1
    }
    /// <summary>
    /// 是否全景观看   
    /// </summary>
    public enum NeedFullView
    {
        /// <summary>
        /// 否
        /// </summary>
        No = 0,
        /// <summary>
        /// 是
        /// </summary>
        Yes = 1
    }
    /// <summary>
    /// 播放模式   
    /// </summary>
    public enum PlayMode
    {
        /// <summary>
        /// 实时直播
        /// </summary>
        RealTime = 0,
        /// <summary>
        /// 延时直播
        /// </summary>
        Delayed = 1
    }
    /// <summary>
    /// 活动分类
    /// </summary>
    public enum ActivityCategory
    {
        发布会 = 001,
        婚礼 = 002,
        年会 = 003,
        体育 = 004,
        游戏 = 005,
        旅游户外 = 006,
        财经 = 007,
        演唱会 = 008,
        烹饪 = 009,
        宠物动物 = 010,
        访谈 = 011,
        教育 = 012,
        竞技 = 013,
        剧场 = 014,
        晚会 = 015,
        电视节目 = 016,
        秀场 = 017,
        其他 = 999
    }

    /// <summary>
    /// 流的码率类型
    /// </summary>
    public enum CodeRateTypes
    {
        流畅=10,
        标清=13,
        高清=16,
        超清=19,
        半高清720P = 22,
        全高清1080P = 25,
        原画=99
    }
}
